/*
 *  Copyright 2003 by Spectrum Digital Incorporated.
 *  All rights reserved. Property of Spectrum Digital Incorporated.
 */

/*
 *  ======== evmdm642_aic23_mute.c ========
 *  EVMDM642_AIC23_mute() implementation
 */

#include <evmdm642.h>
#include <evmdm642_aic23.h>

/*
 *  ======== EVMDM642_AIC23_mute ========
 *  Enable/disable codec mute mode
 */
void EVMDM642_AIC23_mute(EVMDM642_AIC23_CodecHandle hCodec, Int16 mode)
{
    int regval;

    /* Enable mute if mode is true */
    regval = (mode) ? 0x08 : 0x00;

    /* Write to codec registers (left and right) */
    EVMDM642_AIC23_rset(hCodec, EVMDM642_AIC23_DIGPATH,
        (EVMDM642_AIC23_rget(hCodec, EVMDM642_AIC23_DIGPATH) & 0xfff7) | regval);
}
